﻿@model DotaHelp.Models.Shop

<h3>@Model.Name</h3>
<div><img src="@Model.Face" /></div>
@{
    var byNumber = Model.ItemShops.ToDictionary(r => r.Position);
}
<div style="width:357px;height:259px; position:relative;background-image:url(http://habrastorage.org/storage2/8db/ccd/e64/8dbccde64366b839f7b05ac47220559f.jpg)">
    @for(var r = 0; r < 3; r++)
    {
        for(var c = 0; c < 4; c++)
        {
            if (byNumber.ContainsKey(c + r * 4))
            {
                @Html.LinkOnItem(byNumber[c + r * 4].Item, new {style="position:absolute;left:" + (48 + c*74) + "px;top:" + (38+r*74) + "px;"})
            }
        }
    }
</div>